﻿@model IEnumerable<WebUI.Models.QizSubject>
@{
    ViewBag.Title = "我的随访";
    var tm = new QizSubject();
    Layout = "~/Views/Mobile/_MobileLayout.cshtml";
}
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<table class="width" style="border-style: hidden">
    <tr>
        @foreach (string hospital in ViewBag.Hospitals)
        {       
            <td width="180px" style="text-align: left; background-color: #ed7018; border-style: hidden">
                <font color="white">@hospital</font>
            </td>
        }
        <td style="background-color: #f4f4f4; border-style: hidden" align="left">
            &nbsp;
        </td>
    </tr>
</table>
@{
    var hospitalname = (ViewBag.Hospitals as IEnumerable<string>).First();
    var hospitalitem = SiteUser.UserAllRecupers.First().Hospital;
}
<div class="hospital-home">
    <ul class="stacklist" style="text-align: center;">
        @foreach (var m in Model.Where(v => v.Hospital.HospName == hospitalname).OrderByDescending(v => v.SortIdx))
        {
            <li style="text-align: left; margin: 20px; border: none; box-shadow: none;">
                @Helpers.Shadowbox(
            @<table class="width">
                <tr>
                    <td width="120px" valign="top">
                        <a onclick="window.open(this.href,'_self');" href='@(Url.Action("QizSessionEdit", new { SubjectID = m.ID }))' class="bigheartbg bigheartbg-red">
                            <table class="width noborder" height="120px">
                                <tr>
                                    <td height="80px">
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="middle" align="center">
                                        <h3>
                                            立即参与随访</h3>
                                    </td>
                                </tr>
                            </table>
                        </a>
                    </td>
                    <td>
                        <table class="width">
                            <tr>
                                <th colspan="2">
                                    <span>@Html.DisplayFor(modelItem => m.Title)</span>
                                </th>
                            </tr>
                            <tr>
                                <td>
                                    科室：@Html.DisplayFor(modelItem => m.Department.BingQu.Title)
                                </td>
                                <td>
                                    病区：@Html.DisplayFor(modelItem => m.Department.DepName)
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    上次填报：@Helpers.DateTimeString(SiteUser.QizSessions_Of_Recuper.Where(v => v.QizSubjectID == m.ID).OrderByDescending(v => v.Timemark).Select(v => v.Timemark).FirstOrDefault())
                                </td>
                            </tr>
                            <tr>
                                <td style="border: none; white-space: normal; height: 60px;" colspan="2" valign="top"
                                    align="left">
                                    @Html.DisplayFor(modelItem => m.DescForRecuper)
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
                )
            </li>
        }
    </ul>
</div>
